<template>
  <div>
    <button @click="addFollow(1)">添加关注用户1</button>
    <button @click="addFollow(2)">添加关注用户2</button>
    <button @click="addFollow(3)">添加关注用户3</button>
    <button @click="addFollow(4)">添加关注用户4</button>
    <button @click="addFollow(5)">添加关注用户5</button>
    <button @click="addFollow(6)">添加关注用户6</button>
    <van-tabs v-model="active">
      <van-tab title="标签 1">内容 1</van-tab>
      <van-tab title="标签 2">内容 2</van-tab>
      <van-tab title="标签 3">内容 3</van-tab>
      <van-tab title="标签 4">内容 4</van-tab>
    </van-tabs>
    <pinlun :content=" pinlun" v-for="(cont, index) in tiaoshu" :key="index" />
  </div>
</template>

<script>
import pinlun from "@/components/pinglun";
export default {
  components: {
    pinlun
  },
  data() {
    return {
      tiaoshu: [
        {
          cont: "666"
        },
        {
          cont: "有点意思"
        },
        {
          cont: "干得不错"
        },
        {
          cont: "集合，团战"
        }
      ]
    };
  },
  methods: {
    addFollow(id) {
      this.$axios({
        url: "/user_follows/" + id,
        method: "get"
      }).then(res => {
        console.log(res.data);
      });
    }
  }
};
</script>